package com.itheima.sc.web.cms;


import com.itheima.sc.pojo.cms.PrefrenceArea;
import com.itheima.sc.result.Result;
import com.itheima.sc.service.cms.PrefrenceAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/prefrenceArea")
public class PrefrenceAreaController {

    @Autowired
    private PrefrenceAreaService areaService;

    @GetMapping("/listAll")
    public Result listAll(){
        List<PrefrenceArea> areaList=areaService.listAll();
        return Result.success(areaList);
    }

}
